Add a test for JSX namespace lookup with jsx: preserve, jsxImportSource - #41676
Conversation
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
| @@ -1,5 +1,5 @@ | |||
| // @strict: true | |||
| // @jsx: react-jsx | |||
| // @jsx: preserve,react-jsx | |||
There was a problem hiding this comment.
I have no idea what's expected result of @jsx: react + @jsxImportSource: @emotion/react though. It seems like it could be considered an invalid combination?
There was a problem hiding this comment.
We could issue an error in program.ts (within verifyCompilerOptions) - that's probably fine.
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
I think this is a decent test to add -- Mateusz Burzyński (@Andarist) can you get it up to date with master so I can merge it?
|
Note: when I merged from master, I did so when master was broken from some other very-old PRs I recently merged, so this PR now includes a couple of unrelated baseline updates. |
|
Nathan Shively-Sanders (@sandersn) thanks for taking care of this! Was planning to do it later today but u beat me to it 😉 |
This is just a simple follow-up to #41476 which aims to add a regression test that seems to be sufficiently different from the one provided in that PR. At the time I have been providing that former PR I have thought that
jsx: react-jsx,react-jsxdevis a requirement forjsxImportSourceto work but apparently it isn't:TypeScript/src/compiler/utilities.ts
Line 6039 in d070acf
I'm glad that it actually works with
jsx: preserveso I thought it might be a good idea to provide a test for this